// ignore_for_file: constant_identifier_names

import 'dart:math';

import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:lx_widgets_library/lx_widgets_library.dart';

import '../../../config/theme.dart';
import '../../../utils/data_format_util.dart';
import '../custom_view/others/dialog_content_view.dart';
import '../custom_view/others/dialog_list_view.dart';
import '../custom_view/others/dialog_select_list_view.dart';
import '../custom_view/others/scroll_picker_view.dart';

class DialogManager {
  // 正在显示的dialog列表（需要带tag）
  static List isShowList = [];

  /// 自定义Toast
  static bool showToasting = false;
  static Future<void> showToast(String message) {
    return dismiss().then((value) {
      if (showToasting) return Future(() => null);
      showToasting = true;
      return SmartDialog.showToast(message,
          displayTime: const Duration(milliseconds: 2000),
          displayType: SmartToastType.last, onDismiss: () {
        showToasting = false;
      }, builder: (context) {
        return Container(
          decoration: BoxDecoration(
            borderRadius: const BorderRadius.all(Radius.circular(25)),
            color: Colors.grey[850],
            boxShadow: [
              BoxShadow(
                  color: Colors.white.withAlpha(15), // 阴影颜色
                  offset: const Offset(0, 0), // 阴影在X轴和Y轴上的偏移
                  blurRadius: 2.0, // 阴影模糊程度
                  spreadRadius: 1 // 阴影扩散的程度，取值可以正数，也可以是负数
                  )
            ],
          ),
          constraints: const BoxConstraints(minWidth: 100),
          margin:
              EdgeInsets.only(left: 50, right: 50, bottom: screenBottom + 50),
          padding:
              const EdgeInsets.only(left: 20, right: 20, top: 12, bottom: 12),
          child: Text(
            message,
            maxLines: 5,
            textAlign: TextAlign.center,
            overflow: TextOverflow.ellipsis,
            style: const TextStyle(fontSize: 14, color: Colors.white),
          ),
        );
      });
    });
  }

  ///
  /// 底部弹框
  /// 标题 + 详情/自定义Widget + 取消、确认按钮
  /// title：标题
  /// content：文本内容
  /// child：子组件，优先级高于content内容
  /// bottomTips：底部提示语
  /// manuallyBack：手动隐藏（点击按钮不隐藏）
  /// minContentHeight：内容最小高度（内容不够时显示的高度）
  /// isDismissible：点击屏幕隐藏
  /// enableDrag：滑动隐藏
  ///
  static Future<void> show({
    String? tag,
    String? title,
    TextStyle? titleTextStyle,
    Widget? titleWidget,
    EdgeInsetsGeometry? titlePadding,
    String? content,
    TextStyle? contentTextStyle,
    Widget? contentWidget,
    EdgeInsetsGeometry? contentPadding,
    String? cancel,
    String? confirm,
    VoidCallback? onCancel,
    VoidCallback? onConfirm,
    VoidCallback? onTapEvent,
    Widget? bottomWidget,
    EdgeInsetsGeometry? bottomPadding,
    double? titleMaxHeight,
    double? contentMaxHeight,
    double? contentMinHeight,
    Color? backgroundColor,
    BorderRadiusGeometry? borderRadius,
    EdgeInsets? insetPadding,
    bool? manuallyBack,
    bool isDismissible = true, // 点击屏幕隐藏
  }) {
    return _showDialog(
      tag: tag,
      title: title,
      titleTextStyle: titleTextStyle,
      titleWidget: titleWidget,
      titlePadding: titlePadding,
      content: content,
      contentTextStyle: contentTextStyle,
      contentWidget: contentWidget,
      contentPadding: contentPadding,
      cancel: cancel,
      confirm: confirm,
      onCancel: onCancel,
      onConfirm: onConfirm,
      bottomWidget: bottomWidget,
      bottomPadding: bottomPadding,
      titleMaxHeight: titleMaxHeight,
      contentMaxHeight: contentMaxHeight,
      contentMinHeight: contentMinHeight,
      backgroundColor: backgroundColor,
      borderRadius: borderRadius,
      insetPadding: insetPadding,
      isDismissible: isDismissible,
      manuallyBack: manuallyBack,
    );
  }

  static Future<dynamic> showInput({
    String? tag,
    String? title,
    String? inputContent,
    String? hintText,
    InputType? textFieldType = InputType.text,
    String? tips,
    TextStyle? titleTextStyle,
    TextStyle? contentTextStyle,
    String? bottomTips,
    int? maxLength,
    String? cancel,
    String? confirm,
    Function(String)? onChangedValue,
    VoidCallback? onTapBottomTips,
    bool? autofocus, // 是否自动获取焦点
    Color? backgroundColor,
    Color? barrierColor,
    bool? manuallyBack,
    bool? isDismissible,
    VoidCallback? onCancel,
    void Function(String value)? onConfirm,
  }) {
    TextEditingController controller =
        TextEditingController(text: inputContent);

    return _showDialog(
      tag: tag,
      title: title,
      manuallyBack: manuallyBack,
      contentMaxHeight: 180.h,
      contentMinHeight: 80,
      contentWidget: Column(
        children: [
          LxTextField(
              bgPadding:
                  const EdgeInsets.only(left: 10, right: 0, top: 0, bottom: 0),
              placeholder: hintText,
              textFieldType: textFieldType,
              controller: controller,
              bgHeight: 40,
              bgBorder: Border.all(
                  color: Theme.of(Get.context!).dividerColor, width: 1.0),
              bgBorderRadius: BorderRadius.circular(8),
              maxLength: maxLength,
              showClear: true,
              autofocus: autofocus,
              textFontWeight: LxFontWeightEnum.bodyMedium,
              bgMargin: EdgeInsetsDirectional.only(
                start: 20.w,
                end: 20.w,
              ),
              onChangedValue: onChangedValue),
          Visibility(
              visible: DataFormatUtils.isAvailableString(tips),
              child: Container(
                padding: EdgeInsets.only(left: 20.w, right: 20.w, top: 12),
                alignment: Alignment.centerLeft,
                child: Text(tips ?? '',
                    style: TextStyle(
                      fontSize: 12.0,
                      color: lxColorScheme.subtitleColor,
                    )),
              )),
          Visibility(
              visible: DataFormatUtils.isAvailableString(bottomTips),
              child: GestureDetector(
                onTap: onTapBottomTips,
                child: Container(
                  padding: EdgeInsets.only(left: 20.w, right: 20.w, top: 12),
                  alignment: Alignment.centerLeft,
                  child: Text(
                    bottomTips ?? '',
                    style: TextStyle(
                        fontSize: 12.0, color: lxColorScheme.subtitleColor),
                  ),
                ),
              ))
        ],
      ),
      cancel: cancel,
      confirm: confirm,
      onCancel: onCancel,
      onConfirm: () {
        if (onConfirm != null) onConfirm(controller.text);
      },
      isDismissible: isDismissible,
    );
  }

  /// 进度条弹框
  static Future<dynamic> showProgress(RxDouble progress, RxString textContent,
      {String? tag,
      String? title,
      Widget? bottomWidget,
      String? cancel,
      String? confirm,
      bool? manuallyBack,
      bool? isDismissible,
      VoidCallback? onCancel,
      VoidCallback? onConfirm}) {
    return _showDialog(
      tag: tag,
      title: title,
      manuallyBack: manuallyBack,
      contentWidget: SizedBox(
          child: Column(
        children: [
          Row(
            children: [
              Expanded(
                child: Obx(() => LinearProgressIndicator(
                      value: progress.value,
                      color: Colors.grey,
                      valueColor: AlwaysStoppedAnimation<Color>(
                          Theme.of(Get.context!).colorScheme.themeTextColor),
                    )),
              ),
              SizedBox(
                width: 60,
                child: Obx(() => Text(
                      '${(progress.value * 100).truncate()}%',
                      textAlign: TextAlign.center,
                      style: TextStyle(
                          fontSize: 13,
                          color: Theme.of(Get.context!).colorScheme.titleColor),
                    )),
              ),
            ],
          ),
          Container(
            padding: const EdgeInsets.only(top: 20),
            child: Obx(() => Text(
                  textContent.value,
                  textAlign: TextAlign.center,
                  style: TextStyle(
                      fontSize: 14,
                      color: Theme.of(Get.context!).colorScheme.subtitleColor),
                )),
          ),
        ],
      )),
      bottomWidget: bottomWidget,
      cancel: cancel,
      confirm: confirm,
      onCancel: onCancel,
      onConfirm: onConfirm,
      isDismissible: isDismissible,
    );
  }

  /// Loading弹框
  static Future<dynamic> showLoading(
      {String? tag,
      String? title,
      String? content,
      Widget? contentWidget,
      String? cancel,
      String? confirm,
      bool? manuallyBack,
      bool? isDismissible,
      VoidCallback? onCancel,
      VoidCallback? onConfirm}) {
    return _showDialog(
      tag: tag,
      title: title,
      // 无标题时，添加SizedBox以增加头部间隔
      titleWidget: title == null ? const SizedBox.shrink() : null,
      manuallyBack: manuallyBack,
      contentWidget: SizedBox(
          child: Column(
        children: [
          Loading.loadingWidget(
              color: Theme.of(Get.context!).colorScheme.themeTextColor),
          Container(
              margin: EdgeInsets.only(
                  top: 20,
                  // 没有按钮时，添加底部间隔
                  bottom: (cancel == null && confirm == null) ? 50 : 0),
              child: contentWidget ??
                  Text(content ?? '',
                      textAlign: TextAlign.center,
                      style: TextStyle(
                          fontSize: 16,
                          color: Theme.of(Get.context!)
                              .colorScheme
                              .subtitleColor))),
        ],
      )),
      cancel: cancel,
      confirm: confirm,
      onCancel: onCancel,
      onConfirm: onConfirm,
      isDismissible: isDismissible,
    );
  }

  /// 选择弹框（驱动模式等）
  static Future<dynamic> showSelectItem({
    String? tag,
    String? title,
    bool? showSelect,
    RxnInt? selectedIndex,
    List<DialogSelectModel>? dataList,
    void Function(int index)? onTap,
    String? cancel,
    String? confirm,
    bool? manuallyBack,
    bool? isDismissible,
    String? more,
    VoidCallback? onTapMore,
    VoidCallback? onCancel,
    VoidCallback? onConfirm,
  }) {
    return _showDialog(
      tag: tag,
      title: title,
      manuallyBack: manuallyBack,
      contentWidget: Obx(() => DialogSelectListView(
            showSelect: showSelect,
            selectedIndex: selectedIndex?.value,
            more: more,
            dataList: dataList,
            onTap: onTap,
            onTapMore: onTapMore,
          )),
      cancel: cancel,
      confirm: confirm,
      onCancel: onCancel,
      onConfirm: onConfirm,
      isDismissible: isDismissible,
    );
  }

  /// 滚动选择弹框（时间选择等）
  /// 滚动选择弹框（时间选择等）
  static Future<dynamic> showScrollSelectItem({
    String? tag,
    String? title,
    required List<String> items,
    int initialIndex = 0,
    String? cancel,
    String? confirm,
    bool? manuallyBack,
    bool? isDismissible,
    VoidCallback? onCancel,
    Function(int index, String value)? onConfirm,
  }) {
    RxInt selectedIndex = initialIndex.obs;
    RxString selectedValue = items[initialIndex].obs;

    return _showDialog(
      tag: tag,
      title: title,
      manuallyBack: manuallyBack,
      contentMaxHeight: 250.h,
      contentMinHeight: 200.h,
      contentWidget: SizedBox(
        child: ScrollPickerView(
          items: items,
          initialIndex: initialIndex,
          itemHeight: 40.0,
          visibleItemCount: 5,
          onSelectedItemChanged: (index, value) {
            selectedIndex.value = index;
            selectedValue.value = value;
          },
        ),
      ),
      cancel: cancel ?? 'btn_cancel'.tr,
      confirm: confirm ?? 'btn_confirm'.tr,
      onCancel: onCancel,
      onConfirm: () {
        if (onConfirm != null) {
          onConfirm(selectedIndex.value, selectedValue.value);
        }
      },
      isDismissible: isDismissible,
    );
  }

  ///
  /// 显示文本列表（标题+详情）
  /// 远程诊断、当前固件版本等
  ///
  static Future<dynamic> showItems({
    String? tag,
    String? title,
    required List<DialogItemModel> dataList,
    void Function(int index)? onTap,
    String? cancel,
    String? confirm,
    bool? manuallyBack,
    bool? isDismissible,
    String? bottomText,
    Widget? bottomWidget,
    VoidCallback? onTapMore,
    VoidCallback? onCancel,
    VoidCallback? onConfirm,
  }) {
    return _showDialog(
      tag: tag,
      title: title,
      contentWidget: DialogItemList(
          dataList: dataList,
          onTap: (index) {
            if (manuallyBack != true) dismiss(tag: tag);
            if (onTap != null) onTap(index);
          }),
      bottomWidget: bottomWidget ??
          Visibility(
              visible: bottomText != null,
              child: Container(
                alignment: Alignment.topLeft,
                child: AutoSizeText(
                  bottomText ?? '',
                  style: lxTheme.listSubtitleStyle,
                  maxLines: 5,
                  minFontSize: 10,
                  overflow: TextOverflow.ellipsis,
                ),
              )),
      cancel: cancel,
      confirm: confirm,
      onCancel: onCancel,
      onConfirm: onConfirm,
      manuallyBack: manuallyBack,
      isDismissible: isDismissible,
    );
  }

  ///
  /// 显示文本菜单
  /// 启用、试听等
  ///
  static Future<dynamic> showItemsMenu({
    String? tag,
    String? title,
    required List<DialogItemMenuModel> dataList,
    void Function(int index)? onTap,
    String? cancel,
    String? confirm,
    bool? manuallyBack,
    bool? isDismissible,
    String? more,
    VoidCallback? onCancel,
    VoidCallback? onConfirm,
  }) {
    return _showDialog(
      tag: tag,
      title: title,
      child: DialogItemMenuListView(
        dataList: dataList,
        onTap: (index) {
          if (manuallyBack != true) dismiss(tag: tag);
          if (onTap != null) onTap(index);
        },
        onCancel: () {
          if (manuallyBack != true) dismiss(tag: tag);
          if (onCancel != null) onCancel();
        },
      ),
      cancel: cancel,
      confirm: confirm,
      onCancel: onCancel,
      onConfirm: onConfirm,
      manuallyBack: manuallyBack,
      isDismissible: isDismissible,
    );
  }

  ///
  /// 中间弹框
  /// 标题 + 详情/自定义Widget + 取消、确认按钮
  /// manuallyBack: 手动隐藏（点击按钮不隐藏）默认为false
  /// isDismissible: 点击屏幕隐藏，默认为true
  ///
  static Future<void> alert({
    String? tag,
    String? title,
    TextStyle? titleTextStyle,
    Widget? titleWidget,
    EdgeInsetsGeometry? titlePadding,
    String? content,
    TextStyle? contentTextStyle,
    Widget? contentWidget,
    EdgeInsetsGeometry? contentPadding,
    String? cancel,
    String? confirm,
    VoidCallback? onCancel,
    VoidCallback? onConfirm,
    Widget? bottomWidget,
    EdgeInsetsGeometry? bottomPadding,
    double? titleMaxHeight,
    double? contentMaxHeight,
    double? contentMinHeight,
    Color? backgroundColor,
    BorderRadiusGeometry? borderRadius,
    bool? manuallyBack,
    bool? isDismissible,
  }) {
    double alertWidth = min(Get.width * 0.75, 300);
    return _showDialog(
        tag: tag,
        title: title,
        titleTextStyle: titleTextStyle,
        titleWidget: titleWidget,
        titlePadding: titlePadding,
        content: content,
        contentTextStyle: contentTextStyle,
        contentWidget: contentWidget,
        contentPadding: contentPadding,
        cancel: cancel,
        confirm: confirm,
        onCancel: onCancel,
        onConfirm: onConfirm,
        bottomWidget: bottomWidget,
        bottomPadding: bottomPadding,
        titleMaxHeight: titleMaxHeight,
        contentMaxHeight: contentMaxHeight,
        contentMinHeight: contentMinHeight,
        backgroundColor: backgroundColor,
        borderRadius:
            borderRadius ?? const BorderRadius.all(Radius.circular(16)),
        insetPadding:
            EdgeInsets.symmetric(horizontal: (Get.width - alertWidth) * 0.5),
        isDismissible: isDismissible,
        alignment: Alignment.center);
  }

  ///
  /// 中间弹框
  /// 标题 + 详情/自定义Widget + 取消、确认按钮
  /// manuallyBack: 手动隐藏（点击按钮不隐藏）默认为false
  /// isDismissible: 点击屏幕隐藏，默认为true
  ///
  static Future<void> alertCustom({
    String? tag,
    required Widget child,
    bool? isDismissible,
  }) {
    return _showDialog(
        tag: tag,
        alignment: Alignment.center,
        builderChild: child,
        isDismissible: isDismissible);
  }

  ///
  /// 中间弹框 输入框
  /// manuallyBack: 手动隐藏（点击按钮不隐藏）默认为false
  /// isDismissible: 点击屏幕隐藏，默认为true
  ///
  static Future<void> centerInput({
    String? tag,
    bool? isDismissible,
    String? title,
    String? hintText,
    String? inputContent,
    int? maxLength,
    bool? autofocus = true,
    Function(String)? onChangedValue,
    Function()? confirm,
    Function()? cancel,
  }) {
    TextEditingController controller =
        TextEditingController(text: inputContent);
    double w = screenWidth - 64;
    return alertCustom(
      tag: tag,
      child: Container(
        margin: const EdgeInsets.only(bottom: 130),
        decoration: const BoxDecoration(
            borderRadius: BorderRadius.all(Radius.circular(16)),
            color: Color(0xFF141414)),
        width: w,
        height: 194,
        child: Column(
          children: [
            Container(
              padding: const EdgeInsets.only(top: 24, bottom: 16),
              alignment: Alignment.center,
              child: LxText(
                title ?? "",
                color: Colors.white,
                fontWeightEnum: LxFontWeightEnum.titleLarge,
              ),
            ),
            Container(
              padding: const EdgeInsets.only(left: 10, right: 10),
              child: LxTextField(
                enabledBorderColor: const Color(0xFF1F1F1F),
                bgPadding: const EdgeInsets.only(
                    left: 16, right: 0, top: 0, bottom: 0),
                placeholder: hintText,
                textFieldType: InputType.text,
                controller: controller,
                bgHeight: 48,
                bgBorderRadius: BorderRadius.circular(4),
                maxLength: maxLength,
                showClear: true,
                autofocus: autofocus,
                textFieldTextColor: Colors.white.withOpacity(0.4),
                textFontWeight: LxFontWeightEnum.bodyLarge,
                bgMargin: EdgeInsetsDirectional.only(
                  start: 20.w,
                  end: 20.w,
                ),
                onChangedValue: onChangedValue,
              ),
            ),
            Container(
              margin: const EdgeInsets.only(top: 24),
              width: double.infinity,
              height: 0.5,
              color: LxColors.cellLine,
            ),
            Expanded(
              child: SizedBox(
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                  children: [
                    GestureDetector(
                      onTap: () {
                        dismiss(tag: tag);
                        if (cancel != null) {
                          cancel();
                        }
                      },
                      child: Container(
                        alignment: Alignment.center,
                        transformAlignment: Alignment.center,
                        height: double.infinity,
                        width: w / 2 - 1,
                        child: LxText(
                          '取消',
                          color: Colors.white.withOpacity(0.6),
                          fontWeightEnum: LxFontWeightEnum.titleMedium,
                        ),
                      ),
                    ),
                    Container(
                      width: 0.5,
                      color: LxColors.cellLine,
                    ),
                    GestureDetector(
                      onTap: () {
                        dismiss(tag: tag);
                        if (confirm != null) {
                          confirm();
                        }
                      },
                      child: Container(
                        alignment: Alignment.center,
                        transformAlignment: Alignment.center,
                        height: double.infinity,
                        width: w / 2 - 1,
                        child: LxText(
                          'btn_confirm'.tr,
                          color: LxColors.theme,
                          fontWeightEnum: LxFontWeightEnum.titleMedium,
                        ),
                      ),
                    ),
                  ],
                ),
              ),
            )
          ],
        ),
      ),
      isDismissible: isDismissible,
    );
  }

  ///
  /// 显示空弹框，内容自定义
  ///
  static Future<dynamic> showSingle({
    String? tag,
    Widget? child,
    Widget? builderChild,
    bool isDismissible = true, // 点击屏幕隐藏
    Alignment? alignment,
  }) {
    return _showDialog(
      tag: tag,
      child: child,
      builderChild: builderChild,
      alignment: alignment,
      isDismissible: isDismissible,
    );
  }

  static Future<dynamic> _showDialog({
    String? tag,
    Widget? child,
    Widget? builderChild,
    String? title,
    TextStyle? titleTextStyle,
    Widget? titleWidget,
    EdgeInsetsGeometry? titlePadding,
    String? content,
    TextStyle? contentTextStyle,
    Widget? contentWidget,
    EdgeInsetsGeometry? contentPadding,
    String? cancel,
    String? confirm,
    VoidCallback? onCancel,
    VoidCallback? onConfirm,
    Widget? bottomWidget,
    EdgeInsetsGeometry? bottomPadding,
    double? titleMaxHeight,
    double? contentMaxHeight,
    double? contentMinHeight,
    Color? backgroundColor,
    BorderRadiusGeometry? borderRadius,
    EdgeInsets? insetPadding,
    bool? manuallyBack = false, // 手动隐藏（点击按钮不隐藏）默认为false
    bool? isDismissible = true, // 点击屏幕隐藏，默认为true
    Alignment? alignment,
  }) {
    if (isShow(tag)) {
      // 已经存在，不重复显示
      return Future.value();
    }
    if (tag != null) {
      // 记录显示的tag
      isShowList.add(tag);
    }

    return SmartDialog.show(
        tag: tag,
        alignment: alignment ?? Alignment.bottomCenter,
        clickMaskDismiss: isDismissible,
        builder: (_) {
          return builderChild ??
              DialogContentView(
                title: title,
                titleTextStyle: titleTextStyle,
                titleWidget: titleWidget,
                titlePadding: titlePadding,
                content: content,
                contentTextStyle: contentTextStyle,
                contentWidget: contentWidget,
                contentPadding: contentPadding,
                cancel: cancel,
                confirm: confirm,
                onCancel: onCancel,
                onConfirm: onConfirm,
                onTapEvent: () {
                  // 点击按钮隐藏弹框
                  if (manuallyBack != true) dismiss(tag: tag);
                },
                bottomWidget: bottomWidget,
                bottomPadding: bottomPadding,
                titleMaxHeight: titleMaxHeight,
                contentMaxHeight: contentMaxHeight,
                contentMinHeight: contentMinHeight,
                backgroundColor: backgroundColor,
                borderRadius: borderRadius,
                insetPadding: insetPadding,
                child: child,
              );
        },
        onDismiss: () {
          if (isShowList.contains(tag)) {
            isShowList.remove(tag);
          }
        });
  }

  static Future<void> dismiss({String? tag, dynamic result}) {
    if (tag != null) {
      if (isShow(tag)) {
        return SmartDialog.dismiss(tag: tag, result: result);
      }
      return Future.value();
    }
    return SmartDialog.dismiss(result: result);
  }

  static bool isShow(String? tag) {
    return isShowList.contains(tag);
  }

  static void dismissAllTag() {
    for (var tag in isShowList) {
      SmartDialog.dismiss(tag: tag);
    }
  }
}

class DialogTag {
  /// 固件升级弹框
  static const FIRMWARE = 'firmware';
  static const CONNECT_BATTERY_WARNING = 'connect_battery_warning';

  /// 历史连接车辆列表
  static const SWITCH_HISTORY_VEHICLE = 'switch_history_vehicle';

  /// 音效包传输进度
  static const SOUND_UPLOAD = 'sound_upload';

  /// 灯效包传输进度
  static const LIGHT_UPLOAD = 'light_upload';

  /// 云盒连接状态
  static const CLOUD_CONNECT = 'tbox_connect_state';

  /// 远程连接
  static const REMOTE_DIAGNOSE_LOADING = 'remote_diagnose_loading';
  static const REMOTE_DIAGNOSE_WAITING = 'remote_diagnose_waiting';
  static const REMOTE_DIAGNOSE_CANCEL = 'remote_diagnose_cancel';
  static const REMOTE_DIAGNOSE_DISCONNECTED = 'remote_diagnose_disconnected';
  static const REMOTE_DIAGNOSE_PROGRESS = 'remote_diagnose_progress';

  /// 取消音效包传输确认框
  static const SOUND_UPLOAD_CANCEL = 'sound_upload_cancel';

  /// 电机自适应进度
  static const SELF_ADJUSTMENT_MOTOR_LOADING = 'self_adjustment_motor_loading';

  /// 电机自检
  static const MOTOR_SELF_CHECK = 'motor_self_check';

  /// 图形验证码
  static const VERIFY_CAPTCHA = 'verify_captcha';

  /// 上传日志
  static const UPLOAD_LOG = 'upload_log';
  static const UPLOAD_LOG_CANCEL = 'upload_log_cancel';

  /// 上传BMS日志
  static const UPLOAD_BMS_LOG = 'upload_bms_log';
  static const UPLOAD_BMS_LOG_CANCAL = 'upload_bms_log_cancel';

  /// 弹出广告
  static const AD_POP_UP = 'ad_pop_up';
}
